export {}

// 泛型函数
// <T> 规定函数的参数为泛型
function createArr<T>(length:number, value:T){
    let result = [];
    for(let i = 0; i < length; i++){
        result[i] = value
    }
    return result
}
const res = createArr(3, 100)
const res2 = createArr(3, '200')
console.log(res, res2)